<template>
	<div>
		<van-nav-bar 
			:title="title" 
			:fixed="true" 
			left-arrow 
			@click-left="onClickLeft" 
		/>
		<div class="set">
			<van-cell title="个人资料" is-link to="information" />
			<van-cell title="手机号" is-link to="phone" />
			<van-cell title="支付密码设置" is-link to="paymentCode" />
			<van-cell title="登录密码设置" is-link to="loginPassword" />
			<van-cell title="关于五色糖" value="V3.9.1" is-link to="about" />
		</div>
		<van-button type="primary" @click="tui">退出登录</van-button>
		<van-dialog
		  v-model="show"
		  title="确定退出登录？"
		  show-cancel-button
		  confirmButtonColor="#d46170"
		  cancelButtonColor="#d46170"
		  @confirm="que"
		>
		</van-dialog>
	</div>
</template>

<script>
	export default{
		name:"Set",
		data(){
			return {
				title: "设置",
				show:false,
			}
		},
		methods:{
			onClickLeft(){
				this.$router.go(-1)
			},
			tui(){
				this.show = true
			},
			que(){
				console.log(1)
				localStorage.removeItem('token')
				this.$router.push('/login')
			}
		}
	}
</script>

<style scoped="">
	.van-nav-bar__title {
	  color: #fff;
	  font-size: 14px;
	}
	
	.van-nav-bar {
	  height: 46px;
	  background: #d46170;
	}
	
	.van-icon,
	.van-icon::before {
	  color: #FFF;
	  font-size: 12px;
	}
	.set{
		margin-top: 46px;
	}
	.van-cell{
		font-size: 13px;
	}
	button{
		background: #d46170;
		border: 1px solid #d46170;
		height: 50px;
		width: 100%;
		position: fixed;
		bottom: 0;
		left: 0;
	}
	.set .van-icon-arrow:before{color: #999;}
</style>
